//
//  ZZBaseVC.m
//  ZZInputView_Example
//
//  Created by 郑程旭 on 2022/3/25.
//  Copyright © 2022 qq282424020. All rights reserved.
//

#import "ZZBaseVC.h"

@interface ZZBaseVC ()

@end

@implementation ZZBaseVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self.navigationController setNavigationBarHidden:YES animated:NO];

    _canInteractivePopGesture = YES;

    [self configCreateAndLayoutSubviews];
}

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    
    if (self.navigationController.viewControllers.count > 1 && _canInteractivePopGesture) {
        self.navigationController.interactivePopGestureRecognizer.enabled = YES;
    } else {
        self.navigationController.interactivePopGestureRecognizer.enabled = NO;
    }
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
}


#pragma mark - Subviews
- (void)configCreateAndLayoutSubviews {
    [self.view addSubview:self.navView];
    
}

- (ZZBaseNavView *)navView {
    if (!_navView) {
        _navView = [[ZZBaseNavView alloc] init];
    }
    return _navView;
}




@end
